package com.example.mobile2021606163crw0407;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity4 extends AppCompatActivity {

    private TextView tvMainTitle3;
    private TextView tvMain32;
    private TextView tvMain33;
    private TextView tvYuanwen;
    private TextView TVResult3;
    private EditText edtThreeOne;
    private Button btn3;
    int china,glmre,output;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main4);
        initView();
        btn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String string = edtThreeOne.getText().toString();
                int num1=Integer.valueOf(string).intValue();
                if (num1 == china){
                    output = glmre;
                }
                string=String.valueOf(output);
                TVResult3.setText(output);
            }
        });
    }

    private void initView() {
        tvMainTitle3 = (TextView) findViewById(R.id.tv_main_title3);
        tvMain32 = (TextView) findViewById(R.id.tv_main_3_2);
        tvMain33 = (TextView) findViewById(R.id.tv_main_3_3);
        tvYuanwen = (TextView) findViewById(R.id.tv_yuanwen);
        TVResult3 = (TextView) findViewById(R.id.TV_result_3);
        edtThreeOne = (EditText) findViewById(R.id.edt_three_one);
        btn3 = (Button) findViewById(R.id.btn_3);
    }
}